package com.thiswhyme.fsplus.sentinel.feign.defaultdegrade;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

/**
 * @description: 兜底降级配置属性
 * @author: thiswhyme
 * @date: 2021/4/25
 */
@ConfigurationProperties(prefix = "feign.sentinel.fsplus.base-degrade")
public class BaseDegradeProperties {

    /**
     * 是否开启根据配置的service自动生成其实例的兜底降级规则，默认false
     */
    private Boolean enabled = false;

    /**
     * 降级配置对应的nacos数据源配置key
     */
    private String nacosDbName;

    /**
     * 依赖的各出口服务兜底降级配置
     */
    private List<DegradeServiceProperties> services;

    public Boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public String getNacosDbName() {
        return nacosDbName;
    }

    public void setNacosDbName(String nacosDbName) {
        this.nacosDbName = nacosDbName;
    }

    public List<DegradeServiceProperties> getServices() {
        return services;
    }

    public void setServices(List<DegradeServiceProperties> services) {
        this.services = services;
    }
}
